<script setup>
import {ref} from 'vue'
import {getProduct} from '../service/request'
const tableData =ref([])
const loading = ref(false)
function getData(){
    loading.value = true
    getProduct().then(res=>{
        tableData.value = res.data.list
    }).finally(() => {
        loading.value = false
    })
}
getData()
</script>
<template>
<h1>
    <el-table :data="tableData" border style="width: 100%" v-loading="loading">
    <el-table-column prop="store_name" label="商品名称" width="180" />
    <el-table-column prop="cate_name" label="品牌" width="180" />
    <el-table-column prop="store_info" label="信息" />
    <el-table-column prop="price" label="价格" />
  </el-table>
</h1>
</template>